package com.peanut.devlibrary.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by anonymouslystudio on 2017/7/13.
 */

public class TimeUtil {

    public static final String getCurrentSystemFormattedTime(){
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
        return format.format(new Date(System.currentTimeMillis()));
    }

    public static final String getCurrentDate(){
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        return format.format(new Date(System.currentTimeMillis()));
    }

    public static final String getUniqueFileName(){

        return getCurrentSystemFormattedTime() + MathUtil.generateRandomNumber(6);
    }
}
